package main 

import (
	"fmt"
)
//基本数据类型转换
func main(){

	// var i int32 = 100
	// var j float32 = float32(i  )

	// var n1 = int8(i)
	// fmt.Println(i,j,n1)

	

	// var n2 int64 = int64(i)

	// fmt.Printf("n2=%v\n",n2)

	var n1 int32 = 12
	var n2 int64
	var n3 int8 

	//n2 = n1+20  //n1是32位的，n2是64位的，错误
	//n3 = n1+20  //n3是8位的，n1是32位的，也是错误

	n2 = int64(n1)+20
	n3 = int8(n1)+20

	fmt.Printf("n1=%v,n2=%v,n3=%v\n",n1,n2,n3)

}